From: Giovanni Campagna Date: Sat, 19 Nov 2011 18:01:24 +0000 (+0100) Subject: NetworkMenu: fix number of visible networks X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7256 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=aad9179373cdcda5696fbf5958c191e66a85f2eb;p=gnome-shell.git NetworkMenu: fix number of visible networks When placing networks in _createSection, we were taking in consideration that _activeNetwork is always first, by adding 1, but then kept this offset also for networks following it (normally, all of them, since _activeNetwork is also the most recently used), that instead should not be affected by the movement. This resulted in the menu showing 4 networks + More... instead of 5. https://bugzilla.gnome.org/show_bug.cgi?id=664124 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index a68bd8c5f..fa2b8dfab 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1524,8 +1524,10 @@ const NMDeviceWireless = new Lang.Class({ for(let j = 0; j < this._networks.length; j++) { let apObj = this._networks[j]; - if (apObj == this._activeNetwork) + if (apObj == this._activeNetwork) { + activeOffset--; continue; + } this._createNetworkItem(apObj, j + activeOffset); }